#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int test(int n, int count)
{
	if (n == 1)
	{
		return count;
	}
	else
	{
		return test(n - 1, count * n);
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%d", test(n,1));
	return 0;
}